package com.ruiyi.adrobot.mongo.taskdetail;

import com.ruiyi.adrobot.beans.TaskDetail;
import com.ruiyi.adrobot.beans.TaskErrorCode;
import com.ruiyi.adrobot.beans.TaskReport;

import com.ruiyi.adrobot.beans.common.MongoPageRequest;
import org.springframework.data.domain.Page;
import org.springframework.data.mongodb.core.query.Update;

import java.util.List;
import java.util.Map;

public interface TaskDetailOperations {

    TaskDetail getLastTaskByFun(Integer fun);

    void findAndMudifFinishedById(String id, boolean finished);

    void removeTemTask(String taskDetailId, String simCode);

    TaskDetail updateTaskByNum(String taskDetailId, Integer num, Update update);

    TaskDetail updateById(String taskDetailId, Update update);

    TaskDetail.Task findTaskByNum(String taskDetailId, Integer num);

    TaskDetail findByTaskDetailIdAndTaskNum(String taskDetailId, Integer num);

    Page<TaskDetail> getListByPage(MongoPageRequest<Map<String, Object>> mongoPageRequest);

    TaskDetail.Task findTaskByIdAndTasksPhone(String id, String phone);

    TaskDetail.Task findTaskByIdAndTasksAccountInfoUserName(String s, String s1);

    List<String> findUsedImeisById(String taskDetailId);

    List<TaskErrorCode> getErrorCodeByGroup(String id, Integer fun);

    List<TaskReport> findByReportedAndCreateDateBetween(String startDate, String endDate);

    List<TaskDetail.Task> findTasksByTaskDetailIdAndNotSent(String id);
}
